home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / BANZAI.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  709b  |  29 lines

  1. ' BANZAI.BAS
  2. ' This program uses a one-dimensional dynamic string array to store names
  3. '   of characters from the movie "The Adventures of Buckaroo Banzai."
  4.  
  5. OPTION BASE 1               ' set array base at 1
  6.  
  7. CLS
  8.  
  9. PRINT "** This program collects character names from the film ";
  10. PRINT "'Buckaroo Banzai' **"
  11. PRINT
  12. INPUT "How many names would you like to enter?  ", names%
  13.  
  14. DIM characters$(names%)     ' dimension array
  15.  
  16. PRINT                       ' fill dynamic array
  17. FOR i% = 1 TO names%
  18.     INPUT "  Name:  ", characters$(i%)
  19. NEXT i%
  20.  
  21. PRINT
  22. PRINT "You entered the following names:"
  23. PRINT
  24.  
  25. FOR i% = 1 TO names%        ' print contents of array
  26.     PRINT characters$(i%)
  27. NEXT i%
  28.  
  29.